package com.xy.biz.auth.domain.converter;

import java.util.Collection;
import java.util.List;

import com.xy.tool.util.BeanUtilsEx;
import com.xy.biz.auth.domain.bo.CaptchaBO;
import com.xy.biz.auth.domain.po.CaptchaPO;

/**
 * 
 * 
 * @author zsp
 * @date 2020-8-21
 */
public class CaptchaConverter {
	
	public static CaptchaPO toPO(CaptchaBO source) {
		return BeanUtilsEx.copyProperties(source, () -> new CaptchaPO(), true);
	}
	
	public static List<CaptchaPO> toPO(Collection<CaptchaBO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new CaptchaPO(), true);
	}
	
	public static CaptchaBO fromPO(CaptchaPO source) {
		return BeanUtilsEx.copyProperties(source, () -> new CaptchaBO());
	}
	
	public static List<CaptchaBO> fromPO(Collection<CaptchaPO> source) {
		return BeanUtilsEx.copyPropertiesForNewList(source, () -> new CaptchaBO());
	}

}
